<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<script type="text/javascript"
	src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script type="text/javascript">
	function page_nav(frm, num) {
		frm.pageIndex.value = num;
		frm.submit();
	}
</script>
<div class="right">
	<div class="location">
		<strong>你现在所在的位置是:</strong> <span>员工管理页面</span>
	</div>
	<div class="search">
		<form method="post" action="${pageContext.request.contextPath }/list">
			<input name="method" value="query" class="input-text" type="hidden">
			<span>员工姓名：</span> <input name="empName" type="text" value="" /> <span>所属部门:</span>

			<select name="depId">
				<c:if test="${deplist != null }">
					<option value="0">--请选择--</option>
					<c:forEach var="depatement" items="${deplist}">
						<option
							<c:if test="${depatement.depId == queryDepId }">selected="selected"</c:if>
							value="${depatement.depId}">${depatement.depName}</option>
					</c:forEach>
				</c:if>
			</select> <input value="查 询" type="submit" id="searchbutton"
				onclick="page_nav" /> <a
				href="${pageContext.request.contextPath }/addemp">添加员工</a>
		</form>
	</div>
	<!--账单表格 样式和供应商公用-->
	<table class="providerTable" cellpadding="0" cellspacing="0">
		<tr class="firstTr">
			<th width="10%">员工个人照</th>
			<th width="10%">员工编号</th>
			<th width="10%">员工姓名</th>
			<th width="10%">手机号</th>
			<th width="10%">身份证号</th>
			<th width="10%">所属部门</th>
			<th width="10%">岗位</th>
			<th width="10%">状态</th>
			<th width="10%">出生日期</th>
			<th width="30%">操作</th>
		</tr>
		<c:forEach var="bill" items="${listUser }" varStatus="status">
			<tr>
				<td><span><img alt="暂无个人照" src="${bill.picLocPath}"
						width="50px" height="50px"></span></td>
				<td><span>${bill.id }</span></td>
				<td><span>${bill.empName }</span></td>
				<td><span>${bill.phone}</span></td>
				<td><span>${bill.idCardNo}</span></td>
				<td><span> <c:if test="${bill.depId == 1}">生产部</c:if> <c:if
							test="${bill.depId == 2}">销售部</c:if> <c:if
							test="${bill.depId == 3}">办公部</c:if> <c:if
							test="${bill.depId == 4}">技术部</c:if>
				</span></td>
				<td><span> <c:if test="${bill.jobId == 1}">技术员</c:if> <c:if
							test="${bill.jobId == 2}">技术总监</c:if> <c:if
							test="${bill.jobId == 3}">生产员</c:if> <c:if
							test="${bill.jobId == 4}">生产组长</c:if> <c:if
							test="${bill.jobId == 5}">生产助理</c:if> <c:if
							test="${bill.jobId == 6}">销售员</c:if> <c:if
							test="${bill.jobId == 7}">销售经理</c:if> <c:if
							test="${bill.jobId == 8}">办事人员</c:if> <c:if
							test="${bill.jobId == 9}">办公司组长</c:if>
				</span></td>
				<td><span> <c:if test="${bill.status == 0}">技术员</c:if> <c:if
							test="${bill.status == 1}">技术总监</c:if>
				</span></td>
				<td><span> <fmt:formatDate value="${bill.birthdate}"
							pattern="yyyy-MM-dd" />
				</span></td>
				<td><span><a class="viewBill"
						href="viewemp?id=${bill.id}" />查看</a></span></td>
			</tr>
		</c:forEach>
	</table>
	<p>
		当前页:${pageIndex}/${count}
		<c:if test="${pageIndex > 1}">
			<a href="list?pageIndex=1">首页</a>
			<a href="list?(pageIndex=${pageIndex-1},${picPath}=picpath)">上一页</a>
		</c:if>
		<c:if test="${pageIndex < count}">
			<a href="list?pageIndex=${pageIndex+1}">下一页</a>
			<a href="list?pageIndex=${count}">末页</a>
		</c:if>
	</p>
</div>

</section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeBi">
	<div class="removerChid">
		<h2>提示</h2>
		<div class="removeMain">
			<p>你确定要删除该订单吗？</p>
			<a href="#" id="yes">确定</a> <a href="#" id="no">取消</a>
		</div>
	</div>
</div>

<%@include file="/WEB-INF/jsp/common/foot.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/billlist.js"></script>